<?xml version="1.0" encoding="UTF-8"?>
	<!--
		This is to test MeasureTypeBinding without 'uom' in app-schema
		(https://osgeo-org.atlassian.net/browse/GEOT-1272)
	-->
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd">
	<namespaces>
		<Namespace>
			<prefix>ex</prefix>
			<uri>http://example.com</uri>
		</Namespace>
		<Namespace>
			<prefix>gsml</prefix>
			<uri>urn:cgi:xmlns:CGI:GeoSciML:2.0</uri>
		</Namespace>
	</namespaces>	
	<sourceDataStores>
		<DataStore>
			<id>MeasureTypeBindingTest</id>
			<parameters>
				<Parameter>
					<name>directory</name>
					<value>file:./</value>
				</Parameter>
			</parameters>
		</DataStore>
	</sourceDataStores>
	<targetTypes>
		<FeatureType>
			<schemaUri>polymorphism.xsd</schemaUri>
		</FeatureType>
	</targetTypes>
	<typeMappings>
		<FeatureTypeMapping>
			<sourceDataStore>MeasureTypeBindingTest</sourceDataStore>
			<sourceType>MeasureTypeBindingTest</sourceType>
			<targetElement>ex:PolymorphicFeature</targetElement>
			<attributeMappings>
			    <AttributeMapping>
				    <targetAttribute>ex:PolymorphicFeature</targetAttribute>
					<idExpression>
						<OCQL>VALUE_ID</OCQL>
					</idExpression>
				</AttributeMapping>
				<AttributeMapping>					
					<targetAttribute>ex:firstValue</targetAttribute>	
					<sourceExpression>
						<OCQL>VALUE_ID</OCQL>
						<linkElement>NumericType</linkElement>
						<linkField>FEATURE_LINK</linkField>
					</sourceExpression>
				</AttributeMapping>
				<AttributeMapping>					
					<targetAttribute>ex:secondValue</targetAttribute>
					<sourceExpression>
						<OCQL>VALUE_ID</OCQL>
						<linkElement>NumericType</linkElement>
						<linkField>FEATURE_LINK</linkField>
					</sourceExpression>
				</AttributeMapping>
				<AttributeMapping>					
					<targetAttribute>ex:thirdValue</targetAttribute>
					<sourceExpression>
						<OCQL>VALUE_ID</OCQL>
						<linkElement>NumericType</linkElement>
						<linkField>FEATURE_LINK</linkField>
					</sourceExpression>
				</AttributeMapping>
				<AttributeMapping>					
					<targetAttribute>ex:fourthValue</targetAttribute>
					<sourceExpression>
						<OCQL>VALUE_ID</OCQL>
						<linkElement>NumericType</linkElement>
						<linkField>FEATURE_LINK</linkField>
					</sourceExpression>
				</AttributeMapping>
			</attributeMappings>
		</FeatureTypeMapping>
		<FeatureTypeMapping>
			<mappingName>NumericType</mappingName>
			<sourceDataStore>MeasureTypeBindingTest</sourceDataStore>
			<sourceType>MeasureTypeBindingTest</sourceType>
			<targetElement>gsml:CGI_NumericValue</targetElement>
			<attributeMappings>
				<AttributeMapping>
					<targetAttribute>gsml:CGI_NumericValue</targetAttribute>
					<idExpression>
						<OCQL>strConcat('numericvalue_', VALUE_ID)</OCQL>
					</idExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsml:principalValue</targetAttribute>
					<sourceExpression>
						<OCQL>NUMERIC_VALUE</OCQL>
					</sourceExpression>
					<!-- if 'uom' is not set, GeoServer should encode output without ClassCastException -->
					<!-- ClientProperty>
						<name>uom</name>
						<value>'m'</value>
					</ClientProperty-->
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>
			            FEATURE_LINK
  		            </targetAttribute>
					<sourceExpression>
						<OCQL>VALUE_ID</OCQL>
					</sourceExpression>
				</AttributeMapping>
			</attributeMappings>
		</FeatureTypeMapping>
	</typeMappings>
</as:AppSchemaDataAccess>
